<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>我的发布</title>
    <link rel="stylesheet" href="../static/css/bootstrap.min.css">
    <link rel="stylesheet" href="../static/css/index.css">
    <link rel="stylesheet" href="/static/css/myIssus.css">
</head>

<body>
    <div id="container">
        <div id="top">
            <h1>欢迎查看调查问卷</h1>
        </div>
        <div class="navberCard">
            <nav class="navbar navbar-expand-lg navbar-light bg-light" id="nav">
                <a class="navbar-brand" href="#" onclick="index()">首页</a>
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown"
                    aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="collapse navbar-collapse" id="navbarNavDropdown">
                    <ul class="navbar-nav">
                        <li class="nav-item active">
                            <a class="nav-link" href="#" onclick="questionnaire()">调查问卷 <span
                                    class="sr-only">(current)</span></a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#" onclick="newCreate()">发布问卷</a>
                        </li>
                        <li class="nav-item active" id="my">
                            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button"
                                data-toggle="dropdown" aria-expanded="false">
                                我的
                            </a>
                            <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink" id="wo"><!-- 
                                <a class="dropdown-item" href="/index/goMyInfo" onclick="myInfo()">我的资料</a>
                                <a class="dropdown-item" href="#" onclick="myIssus()">我的发布</a> -->
                                <a class="dropdown-item" href="/index/goAdminRevise" onclick="">修改密码</a>
                                <a class="dropdown-item" href="#" onclick="logout()">退出登录</a>
                            </div>
                        </li>
                    </ul>
                </div>
            </nav>
        </div>
        <form action="">
            <div class="body">
                <div class="card-header" style="background-color: #ffffff;border-radius:1rem;">
                    <div class="row">
                        <div class="col-sm-10">主题：</div>
                    </div>
                </div>
                <div class="card-body">
                    <ul class="list-group list-group-flush" id="{{msg.id}}">
                        <li class="list-group-item">
                            <blockquote class="blockquote mb-0">
                                <p>来投票！</p>
                                <footer>
                                </footer>
                                <div class="col-sm-2 d-flex justify-content-start">
                                    <button type="button"class="bnt"onclick="score()">删除</button>
                                </div>
                            </blockquote>
                        </li>

                    </ul>
                </div>
            </div>

        </form>
    </div>
    </div>

    <script src="../static/js/canvas-particle.js"></script>
    <script src="../static/js/jquery-3.6.0.min.js"></script>
    <script src="../static/js/bootstrap.min.js"></script>
    <script src="https://cdn.bootcss.com/axios/0.18.0/axios.min.js"></script>

    <script>
        function logout() {
            axios({
                method: 'post',
                url: '/logout'
            }).then(function (response) {
                let res = response.data;
                if (res.code === 200) {
                    window.location.href = '/login';
                }
            }).catch((err) => {
            });
        }
        function index() {
            axios({
                method: 'post',
                url: '/goIndex'
            }).then(function (response) {
                let res = response.data;
                if (res.code === 200) {
                    window.location.href = '/';
                }
            }).catch((err) => {
            });
        }
        function myInfo() {
            axios({
                method: 'post',
                url: '/myInfo'
            }).then(function (response) {
                let res = response.data;
                if (res.code === 200) {
                    window.location.href = '/index/goMyInfo';
                }
            }).catch((err) => {
            });
        }
        function myIssus() {
            axios({
                method: 'post',
                url: '/myIssus'
            }).then(function (response) {
                let res = response.data;
                if (res.code === 200) {
                    window.location.href = '/goMyIssus';
                }
            }).catch((err) => {
            });
        }

        function questionnaire() {
            axios({
                method: 'post',
                url: '/questionnaire'
            }).then(function (response) {
                let res = response.data;
                if (res.code === 200) {
                    window.location.href = '/index/goQuestionnaire';
                }
            }).catch((err) => {
            });
        }
        function newCreate() {
            axios({
                method: 'post',
                url: '/newCreate'
            }).then(function (response) {
                let res = response.data;
                if (res.code === 200) {
                    window.location.href = '/goNewCreate';
                }
            }).catch((err) => {
            });
        }
        function score() {
            axios({
                method: 'post',
                url: '/score'
            }).then(function (response) {
                let res = response.data;
                if (res.code === 200) {
                    window.location.href = '/goScore';
                }
            }).catch((err) => {
            });
        }
    </script>
</body>

</html> 